home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-09-14 | 2.3 KB | 87 lines | [TEXT/MPS ] |
- ; File FdefHeader.a
- ; -----------------------------------------------------------------------------
- ; Header generate program and utility routine for sample FDEF of KanjiTalk .
- ;
- ; Copyright Apple Computer, Inc. 1987-89.
- ; All Rights Reserved.
- ; Written by H.Takahashi
- ;
- ; updated to second version. jwc 10/25/89
- ; 900126 cjw Moved FDEFDispatch from before "bra.s @0"
- ; to present position to help linker reduce size
- ; of generated object
- ; -----------------------------------------------------------------------------
-
- Proc
- Blanks On
- String Asis
-
- FDEFDispatch MAIN EXPORT
-
- import OpenFDEF
- import CloseFDEF
-
- import NewFbit
- import DisposeFbit
- import OpenFbit
- import CloseFbit
- import ReadyFbit
-
- import GetChar
- import SetChar
- import AddChar
- import DelChar
- export SETFISERROR
-
- fdefIDDisk equ 7 ; On demand Disk access fdef.
- fdefVersDisk equ 1 ; second version. (GCC)
-
- bra.s @0 ; skip header.
- dc.l 'fdef' ; resource type.
- dc.w fdefIDDisk ; resource id.
- dc.w fdefVersDisk ; version number.
- dc.w 1<<14 ; Can make new fbit.
-
- @0 move.l (sp)+,a0 ; pop the return address.
- move.w (sp)+,d0 ; pop the selector.
- move.l a0,-(sp) ; push the return address.
- lea offsetTable,a0 ; get the offset table pointer.
- move.w 0(a0,d0.w),d0 ; Load the offset.
- jmp 0(a0,d0.w) ; jump to the routine.
-
- ; The offset table is indexed by a font package selector and each entry is
- ; the offset to the proper routine from the beginning of the table.
-
- offsetTable
- dc.w OpenFDEF - offsetTable
- dc.w CloseFDEF - offsetTable
-
- dc.w NewFbit - offsetTable
- dc.w DisposeFbit - offsetTable
- dc.w OpenFbit - offsetTable
- dc.w CloseFbit - offsetTable
- dc.w ReadyFbit - offsetTable
-
- dc.w GetChar - offsetTable
- dc.w SetChar - offsetTable
- dc.w AddChar - offsetTable
- dc.w DelChar - offsetTable
-
- ; ----------------------------------------------------------------------------
- ; Routine SetFISError(theError: Integer);
- ; Input sp.w New value for FISError.
- ; Output
- ; Function Simple little routine to set the current value of FISError.
- ; ----------------------------------------------------------------------------
-
- SETFISERROR
- movea.l $ba0,a0
- movea.l $76(a0),a0
- move.l (sp)+,a1 ; pop return address.
- move.w (sp)+,$74(a0) ; set FIS error value.
- jmp (a1) ; return to the caller.
-
-
- EndP
- End
-